<template>

    <div>
        <file-upload
                class="select-file-bto lh-38"
                :post-action="uploadAction"
                :extensions="extensions"
                :accept="accept"
                :multiple="true"
                :size="size || 0"
                :thread="thread < 1 ? 1 : (thread > 5 ? 5 : thread)"
                :headers="headers"
                :drop="true"
                :drop-directory="true"
                v-model="files"
                @input-filter="inputFilter"
                @input-file="inputFile"
                ref="upload">
            上传文件
        </file-upload>
    </div>

</template>

<script>
    import FileUpload from 'vue-upload-component'

    export default {
        name: "file-upload",
        data() {
            return {
                files: [],
                uploadAuto: true,
                uploadAction: uploadAction,
                autoCompress: 1024 * 1024 * 10,
                size: 1024 * 1024 * 10,
                thread: 3,
                accept: 'image/png,image/gif,image/jpeg,image/webp',
                extensions: 'gif,jpg,jpeg,png,webp',
                headers: {
                    'X-Token': 'xxxx'
                },
            }
        }
    }
</script>

<style scoped>

</style>